package com.eshop.modules.customer.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.NotBlank;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("store_customer")
public class StoreCustomer extends BaseDomain
{
    @TableId
    private Long id;
    private String nickName;
    @NotBlank(message = "请用户扫码后提交")
    private String openId;
    private String remark;
    private Integer isEnable;
    
    public void copy(final StoreCustomer source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Long getId() {
        return this.id;
    }
    
    public String getNickName() {
        return this.nickName;
    }
    
    public String getOpenId() {
        return this.openId;
    }
    
    public String getRemark() {
        return this.remark;
    }
    
    public Integer getIsEnable() {
        return this.isEnable;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setNickName(final String nickName) {
        this.nickName = nickName;
    }
    
    public void setOpenId(final String openId) {
        this.openId = openId;
    }
    
    public void setRemark(final String remark) {
        this.remark = remark;
    }
    
    public void setIsEnable(final Integer isEnable) {
        this.isEnable = isEnable;
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof StoreCustomer)) {
            return false;
        }
        final StoreCustomer other = (StoreCustomer)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0065: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0065;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$isEnable = this.getIsEnable();
        final Object other$isEnable = other.getIsEnable();
        Label_0102: {
            if (this$isEnable == null) {
                if (other$isEnable == null) {
                    break Label_0102;
                }
            }
            else if (this$isEnable.equals(other$isEnable)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$nickName = this.getNickName();
        final Object other$nickName = other.getNickName();
        Label_0139: {
            if (this$nickName == null) {
                if (other$nickName == null) {
                    break Label_0139;
                }
            }
            else if (this$nickName.equals(other$nickName)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$openId = this.getOpenId();
        final Object other$openId = other.getOpenId();
        Label_0176: {
            if (this$openId == null) {
                if (other$openId == null) {
                    break Label_0176;
                }
            }
            else if (this$openId.equals(other$openId)) {
                break Label_0176;
            }
            return false;
        }
        final Object this$remark = this.getRemark();
        final Object other$remark = other.getRemark();
        if (this$remark == null) {
            if (other$remark == null) {
                return true;
            }
        }
        else if (this$remark.equals(other$remark)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof StoreCustomer;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $isEnable = this.getIsEnable();
        result = result * 59 + (($isEnable == null) ? 43 : $isEnable.hashCode());
        final Object $nickName = this.getNickName();
        result = result * 59 + (($nickName == null) ? 43 : $nickName.hashCode());
        final Object $openId = this.getOpenId();
        result = result * 59 + (($openId == null) ? 43 : $openId.hashCode());
        final Object $remark = this.getRemark();
        result = result * 59 + (($remark == null) ? 43 : $remark.hashCode());
        return result;
    }
    
    public String toString() {
        return "StoreCustomer(id=" + this.getId() + ", nickName=" + this.getNickName() + ", openId=" + this.getOpenId() + ", remark=" + this.getRemark() + ", isEnable=" + this.getIsEnable() + ")";
    }
}
